<template>
  <div class="miyoubi">
    <div class="head">
      <span class="title">米游币</span>
      <span class="show" v-if="arr.length != 0">
        <img src="@/assets/wode_imgs/miyoubi.png" alt="">
        <span>{{newdata.miyoubi}}</span>
      </span>
      <span v-else></span>
    </div>
    <div class="body">
      <div class="once">
        <img src="@/assets/wode_imgs/huodebi.png" alt="">
        <dl>
          <dd class="da">获取米游币</dd>
          <dd class="xiao" v-if="arr.length != 0">今日还可获得{{newdata.getmore}}</dd>
        </dl>
      </div>
      <div class="once">
        <img src="@/assets/wode_imgs/duihuanbi.png" alt="">
        <dl>
          <dd class="da">兑换中心</dd>
          <dd class="xiao" v-if="arr.length != 0">原神抽抽乐已开启</dd>
        </dl>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props:["arr"],
  created(){
    this.$store.dispatch('getinformation',{url:"/data/wode/information"})
  },
  computed:{
    newdata(){
      return this.$store.state.information.data;
    }
  },
}
</script>

<style scoped>
  .miyoubi{
    min-height: 1.18rem;
    /* background-color: white; */
    padding: .15rem 0;
    border-bottom: 1px solid rgb(235,235,235);
  }
  .miyoubi .head{
    height: .18rem;
    line-height: .18rem;
    font-size: .18rem;
    font-weight: 700;
  } 
  .miyoubi .head .title{
    margin-right: .1rem;
  }
  .miyoubi .head .show{
    width: .53rem;
    background-color: rgb(245,245,245);
    border-radius: .09rem;
    color: rgb(254,155,80);

  }
  .miyoubi .head .show img{
    height: 100%;
    vertical-align: middle;
  }
  .miyoubi .head .show span{
    vertical-align: middle;
    font-size: .14rem;
    padding: 0 .03rem;
  }
  .miyoubi .body{
    margin: .15rem 0;
    display: flex;
    justify-content: space-between;
  }
  .miyoubi .body .once{
    width: 1.65rem;
    height: .56rem;
    background-color: rgb(245,245,245);
    padding: .1rem;
    display: flex;
    border-radius: .05rem;
  }
  .miyoubi .body .once dl{
    margin-left: .05rem;
  }
  .miyoubi .body .once img{
    height: 100%;
  }
  .miyoubi .body .once .da{
    font-size: .14rem;
  }
  .miyoubi .body .once .xiao{
    font-size: .1rem;
    color: rgb(254,155,80);
  }
</style>